package com.financing.platform.dao.impl;

import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IActivitieGroupDao;
import com.financing.platform.dto.ActivitiesGroupDTO;
import com.financing.platform.util.SqlName;


@Repository("activitieGroupDao")
public class ActivitieGroupDaoImpl extends BaseDaoImpl implements IActivitieGroupDao {

	@SuppressWarnings("unchecked")
	@Override
	public List<ActivitiesGroupDTO> queryActivitiesGroupInfo(ActivitiesGroupDTO agd) throws Exception {
		return this.sqlMapClient.queryForList(SqlName.queryActivitiesGroupInfo,agd);
	}
	@SuppressWarnings("unchecked")
	@Override
	public int queryActivitiesGroupInfoCount(ActivitiesGroupDTO agd) throws Exception {
		return (Integer) this.sqlMapClient.queryForObject(SqlName.queryActivitiesGroupInfoCount,agd);
	}

	@Override
	public int updateActivitiesGroup(ActivitiesGroupDTO agd) throws Exception {
		return this.sqlMapClient.update(SqlName.updateActivitiesGroup, agd);
	}

	@Override
	public String queryFaIdByMoblie(String moblie) throws SQLException {
		return (String) this.sqlMapClient.queryForObject(SqlName.queryFaUserByMoblie,moblie);
	}

	@Override
	public Integer queryFaHadGetGroupGift(ActivitiesGroupDTO agd) throws Exception {
		return (Integer) this.sqlMapClient.queryForObject(SqlName.queryFaHadGetGroupGift,agd);
	}

	@Override
	public Integer queryActivitiesGroupAuthMember(ActivitiesGroupDTO agd) throws Exception {
		return (Integer) this.sqlMapClient.queryForObject(SqlName.queryActivitiesGroupAuthMember,agd);
	}

	@Override
	public List<ActivitiesGroupDTO> queryactGroupList(String groupId) throws Exception {
		return this.sqlMapClient.queryForList(SqlName.queryactGroupList, groupId);
	}

}
